home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Development Libraries
/
SGI IRIX 6.2 Development Libraries.iso
/
dist
/
complib.idb
/
usr
/
share
/
catman
/
p_man
/
cat3
/
complib
/
pskysl.z
/
pskysl
Wrap
Text File
|
1996-03-14
|
10KB
|
331 lines
PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF)))) PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF))))
NNNNAAAAMMMMEEEE
DSKYJ, FBSJ, DSKYRJ, FBSRJ - parallel skyline symmetric linear system
solver
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
PSKYSL solves skyline, or profile, symmetric linear systems of the form
Ax = b
where A is an n x n symmetric input matrix stored in either the Jenning's
profile format or the reverse Jenning's profile format (described later),
b is an input vector of length n, and x is an unknown vector of length n.
PSKYSL uses a direct method: A is factored into the form
A = L D L-transpose
where L is a lower triangular matrix with unit diagonal and D is a
diagonal matrix.
The PSKYSL library contains four routines. DSKYJ() factors the matrix A,
which is stored in the Jenning's format, into L and D. FBSJ() solves for
a vector x using the results (L and D) that are generated by DSKYJ(),
given an input vector b. DSKYRJ() factors the matrix A, which is stored
in the reverse Jenning's format, into L and D. Similar to FBSJ(), FBSRJ()
solves for a vector x in the reverse Jenning's case, for the given input
vector b. It is assumed that the input matrix A has been reordered by a
popular heuristic such as Gibbs-King, or Reverse Cutill-McGee, for
profile size reduction before a factorization routine is called. The
PSKYSL solvers also have the ability to do incremental factorization of
the input matrix A so as to reduce the memory requirements to run the
solvers.
To illustrate the skyline storage schemes, consider the following
symmetric 4x4 array:
1.0 0.0 2.0 0.0
3.0 0.0 4.0
5.0 0.0
symmetric 6.0
The Jenning's representation of the array in FORTRAN would be:
pointers[] = {1, 2, 5, 8}
values[] = {1.0, 3.0, 2.0, 0.0, 5.0, 4.0, 0.0, 6.0}
And the reverse Jenning's representation would be:
pointers[] = {1, 2, 3, 6, 9}
values[] = {1.0, 3.0, 5.0, 0.0, 2.0, 6.0, 0.0, 4.0}
Due to symmetry, only the upper triangular part of the array needs to be
stored. Each column is stored in a top-down/bottom-up fashion, i.e.
from the first nonzero entry to the diagonal or the other way around,
into values[]. The zero entries outside the skyline profile are not
stored. The book-keeping array pointers[] keeps track of the locations
of the diagonal elements in values[]. Note that in the reverse Jenning's
PPPPaaaaggggeeee 1111
PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF)))) PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF))))
case, the last entry in pointers[] provides the information of the total
number of terms plus one.
The number of processors that are used for the numerical factorization
are controlled through an argument that is passed to the factor routines.
No special environment variable setting is required for this matter.
Parallel threads (if any) in the PSKYSL library are created with 'sproc'
system calls, and are not inherited from existing C or Fortran threads.
Therefore, it is advisable to terminate any outstanding Fortran or C
slave threads with mp_destroy, etc., before the PSKYSL library is called.
FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
SUBROUTINE DSKYJ (VALUES, POINTERS, DINV, NCPU, NEQ, LEAD)
DOUBLE PRECISION VALUES( * )
INTEGER POINTERS( * )
DOUBLE PRECISION DINV( * )
INTEGER NCPU
INTEGER NEQ
INTEGER LEAD
SUBROUTINE FBSJ (VALUES, DINV, N, POINTERS, B, SCR)
DOUBLE PRECISION VALUES( * )
DOUBLE PRECISION DINV( * )
INTEGER N
INTEGER POINTERS( * )
DOUBLE PRECISION B( * )
INTEGER SCR ( * )
SUBROUTINE DSKYRJ (VALUES, POINTERS, DINV, NCPU, NEQ, LEAD)
DOUBLE PRECISION VALUES( * )
INTEGER POINTERS( * )
DOUBLE PRECISION DINV( * )
PPPPaaaaggggeeee 2222
PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF)))) PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF))))
INTEGER NCPU
INTEGER NEQ
INTEGER LEAD
SUBROUTINE FBSRJ (VALUES, DINV, N, POINTERS, B, SCR)
DOUBLE PRECISION VALUES( * )
DOUBLE PRECISION DINV( * )
INTEGER N
INTEGER POINTERS( * )
DOUBLE PRECISION B( * )
INTEGER SCR ( * )
AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
values (input to DSKYJ and DSKYRJ)
The upper triangular part of the input matrix A stored in either
the Jenning's or the reverse Jenning's format.
values (output from DSKYJ and DSKYRJ)
The factor L-transpose, except that the diagonal locations are
replaced with D, stored in the Jenning's or the reverse Jenning's
format.
values (input to FBSJ and FBSRJ)
The factor L-transpose, except that the diagonal locations are
replaced with D, stored in the Jenning's or the reverse Jenning's
format.
pointers (input)
An integer vector pointing to the position of the diagonal
elements of the input matrix A in values[]. This vector is
usually of length n in the Jenning's case, and n+1 in the reverse
Jenning's case. However, in an incremental factorization, the
length may be less than n/n+1.
dinv (input to DSKYJ and DSKYRJ)
A double precision vector of length n.
dinv (output from DSKYJ and DSKYRJ)
The inverse of D.
PPPPaaaaggggeeee 3333
PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF)))) PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF))))
dinv (input to FBSJ and FBSRJ)
The inverse of D.
ncpu (input)
The number of processors that are used for the numerical
factorization routines DSKYJ and DSKYRJ.
neq (input)
The number of equations to be factorized in the call. The neq
number is set to n if no incremental factorization is performed.
lead (input)
The first equation to be factorized in the call. The lead number
is set to 1 if no incremental factorization is performed.
n (input)
The number of rows and columns in the matrix A, or the order of
A. n >= 0.
b (input)
The right-hand-side vector in a FBSJ/FBSRJ call.
b (output)
The solution vector in a FBSJ/FBSRJ call.
scr (input)
An integer scratch vector of n long.
TTTTUUUUNNNNIIIINNNNGGGG
Optimized and parallelized for the SGI R8000 platform.
IIIINNNNCCCCRRRREEEEMMMMEEEENNNNTTTTAAAALLLL FFFFAAAACCCCTTTTOOOORRRRIIIIZZZZAAAATTTTIIIIOOOONNNN
Sometimes it is desired to perform the factorization of the input matrix
A in an incremental fashion so that a large portion of the array can be
kept in a disk device to conserve memory resources. The PSKYSL library
provides such a memory-saving capability if a proper sequence of
values[], pointers[], and other book-keepings is constructed and passed
to a series of calls to the factorization routines. The following
example illustrates a single thread incremental factorization of the a.m.
4x4 array with two calls to DSKYJ.
1) First call
pointers0[] = {1, 2, 5}
values0[] = {1.0, 3.0, 2.0, 0.0, 5.0}
dinv0[] = { 0.0, 0.0, 0.0}
ncpu0 = 1
neq0 = 3
lead0 = 1
PPPPaaaaggggeeee 4444
PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF)))) PPPPSSSSKKKKYYYYSSSSLLLL((((3333FFFF))))
2) Second call
pointers1[] = {1, 4, 7}
values1[] = {values0[3], values0[4], values0[5],
values0[6], 4.0, 0.0, 6.0}
dinv1[] = { dinv0[2], dinv0[3], 0.0}
ncpu1 = 1
neq1 = 3
lead1 = 3
Note that parts of the 'values' and the 'dinv' arrays in the second call
inherit the results from the first call.
PPPPaaaaggggeeee 5555